<extend name="template:common"/>
<block name="js">
    <script src="__TREEGRID__/js/jquery.treegrid.js"></script>
    <script>
        $(function () {
            $('.tree').treegrid();
        });
    </script>
</block>
<block name="css">
    <css href="__CSS__/page.css"/>
    <css href="__TREEGRID__/css/jquery.treegrid.css"/>
</block>
<block name="main">
    <h1>
        <span class="action-span"><a href="{:U('add')}">菜单添加</a></span>
        <span class="action-span1"><a href="{:U()}">菜单管理</a></span>
        <span id="search_id" class="action-span1"> - {$meta_title} </span>
        <div style="clear:both"></div>
    </h1>
    <div class="form-div">
        <form action="{:U('')}" name="searchForm">
        </form>
    </div>
    <form method="post" action="" name="listForm">
        <div class="list-div" id="listDiv">
            <table cellpadding="3" cellspacing="1" class="tree">
                <tr>
                    <th>菜单名</th>
                    <th>路径</th>
                    <th>简介</th>
                    <th>是否显示</th>
                    <th>排序</th>
                </tr>
                <foreach name="rows" item="row">
                    <tr class="treegrid-{$row.id} <neq name='row.level' value='1'>treegrid-parent-{$row.parent_id}</neq>">
                        <td class="first-cell">{$row.name}</td>
                        <td class="center-cell">{$row.path}</td>
                        <td align="center">{$row.intro}</td>
                         <td align="center"><img src="__IMG__/{$row.status}.gif" /></td>
                        <td>
                            <a href="{:U('edit',array('id'=>$row['id']))}"><img title="编辑" src="__IMG__/icon_edit.gif"
                                                                                width="16" height="16" border="0"/></a>
                            <a href="{:U('del',array('id'=>$row['id']))}"><img title="删除" src="__IMG__/icon_trash.gif"
                                                                               width="16" height="16" border="0"/></a>
                        </td>
                    </tr>
                </foreach>
                <tr>
                    <td align="right" nowrap="true" colspan="6">
                        <div class="page">
                            {$page_html}
                        </div>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</block>
</body>
</html>